using System;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Windows.Forms;
using IE = Interop.SHDocVw;
using AddinExpress.IE;
 
namespace TaobaoPick
{
    /// <summary>
    /// Add-in Express for Internet Explorer Module
    /// </summary>
    [ComVisible(true), Guid("7F638BD0-F96F-4530-B35F-76FD601B8C63")]
    public class IEModule : AddinExpress.IE.ADXIEModule
    {
        public IEModule()
        {
            InitializeComponent();
            //Please write any initialization code in the OnConnect event handler

        }

        private ADXIEBarItem adxieBarItem1;
        private ADXIEHTMLDocEvents adxiehtmlDocEvents1;

        private ADXIEToolBarItem adxieToolBarItem1;
 
        public IEModule(IContainer container)
        {
            container.Add(this);
 
            InitializeComponent();
            //Please write any initialization code in the OnConnect event handler
        }
 
        #region Component Designer generated code
        /// <summary>
        /// Required by designer
        /// </summary>
        private System.ComponentModel.IContainer components;
 
        /// <summary>
        /// Required by designer support - do not modify
        /// the following method
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.adxieToolBarItem1 = new AddinExpress.IE.ADXIEToolBarItem(this.components);
            this.adxieBarItem1 = new AddinExpress.IE.ADXIEBarItem(this.components);
            this.adxiehtmlDocEvents1 = new AddinExpress.IE.ADXIEHTMLDocEvents(this.components);
            // 
            // adxieToolBarItem1
            // 
            this.adxieToolBarItem1.MenuText = "RecordSearchResult";
            this.adxieToolBarItem1.ToolBarType = "TaobaoPick.MyIEToolbar1";
            // 
            // adxieBarItem1
            // 
            this.adxieBarItem1.BarType = "TaobaoPick.MyIEBarX";
            this.adxieBarItem1.MenuText = "adxieBarItem1";
            // 
            // IEModule
            // 
            this.Bars.Add(this.adxieBarItem1);
            this.HandleShortcuts = true;
            this.LoadInMainProcess = false;
            this.ModuleName = "TaobaoPick";
            this.ToolBars.Add(this.adxieToolBarItem1);

        }
        #endregion
 
        #region ADX automatic code
 
        // Required by Add-in Express - do not modify
        // the methods within this region
 
        public override System.ComponentModel.IContainer GetContainer()
        {
            if (components == null)
                components = new System.ComponentModel.Container();
            return components;
        }
 
        [ComRegisterFunctionAttribute]
        public static void RegisterIEModule(Type t)
        {
            AddinExpress.IE.ADXIEModule.RegisterIEModuleInternal(t);
        }
 
        [ComUnregisterFunctionAttribute]
        public static void UnregisterIEModule(Type t)
        {
            AddinExpress.IE.ADXIEModule.UnregisterIEModuleInternal(t);
        }
 
        [ComVisible(true)]
        public class IECustomContextMenuCommands :
            AddinExpress.IE.ADXIEModule.ADXIEContextMenuCommandDispatcher
        {
        }
 
        [ComVisible(true)]
        public class IECustomCommands :
            AddinExpress.IE.ADXIEModule.ADXIECommandDispatcher
        {
        }
 
        #endregion
 
        public IE.WebBrowser IEApp
        {
            get
            {
                return (this.IEObj as IE.WebBrowser);
            }
        }
 
        public mshtml.HTMLDocument HTMLDocument
        {
            get
            {
                return (this.HTMLDocumentObj as mshtml.HTMLDocument);
            }
        }

 
    }
}

